% filePrefix = 'data/100/';
% 
% nbCities = 100;
% count = zeros(10,9);
% for i = 1:10
%     
%     fileP = strcat(filePrefix,num2str(i),'/');
%     for j = 1:9
%         file = strcat(fileP,'genCost',num2str(i),'_',num2str(j),'.dat');
%        GenCost = csvread(file);
%        
%       file = strcat(fileP,'Result',num2str(i),'_',num2str(j),'.dat');
%            result =csvread(file);
%            
%            count(i,j) = calculateDists( result, GenCost, 1000 );
%     end      
% end
%  
oneDirection = (1:9)*10;
Percil20 = prctile(count,20);
Percil80 = prctile(count,80);
med = median(count);
maxVal = max(count);

rr = [oneDirection;Percil20;med;Percil80;maxVal];
csvwrite('constSize',rr);

% 
% hold on;
% h =   plot(oneDirection(1:6),maxVal(1:6),'-','LineWidth',1,...
%     'Color','black');
% 
% plot(oneDirection(1:6),Percil80(1:6),'--ro','LineWidth',1,...
%     'MarkerEdgeColor','k', ...
%     'MarkerFaceColor','red');
% 
% plot(oneDirection(1:6),med(1:6),'-ro','LineWidth',2,...
%     'MarkerFaceColor',[0.8 0 0],...
%     'MarkerSize',10);
% 
% plot(oneDirection(1:6),Percil20(1:6),'--ro','LineWidth',1,...
%     'MarkerEdgeColor','k', ...
%     'MarkerFaceColor','red');
% 
% 
% xlabel('Procent drog jednokierunkowych');
% ylabel('Liczba wybranych drog jednokierunkowych');
% legend('Maksimum','Kwantyl 80%','Mediana','Kwantyl 20%',...
%     'Location','NorthEastOutside');
% 
% print('-depsc2','constSize')
%  
